#ifndef MKV_DECODE_H
#define MKV_DECODE_H

#include <gst/gst.h>
#include <gst/app/app.h>
#include <filesystem>

class MKV_Decode
{
  public:
    MKV_Decode(std::filesystem::path path);
    virtual ~MKV_Decode();
    void GetNewImage(char* data); //如果eof就抛出异常
  private:
    GstElement *filesrc,*matroskademux,*h264parse,*nvh264dec,*cudaconvert,*cudadownload,*appsink,*pipeline;
    friend void pad_append_handler(GstElement *src, GstPad *pad, MKV_Decode *data);
};

#endif
